
function Buy_XiangYaoChuMoWndTip(sysarg)

end



--购买皇杠提示框
function Buy_HuangGangWndTip(sysarg)
--[[
	local str = "{color;FFFF0000;您要消耗200元宝购买一次领取皇杠<br/}{color;FF00FF00;(选择放弃购买,将不在面板上显示)}"
	Actor.messageBox(sysarg,0,0,str, "购买一次/Buy_HuangGang,1", "放弃购买/Buy_HuangGang,2", NULL, 0)
	--]]
end

-- 购买皇杠
function Buy_HuangGang(sysarg,type)
--[[
	if tonumber(type) == 1 then --购买一次
		--//读取变量
		local var = Actor.getStaticVar(sysarg);
		local applyTimes = var.days.darttms

		if var.days.darttms >= EscortDartConfig.OpenTimes then
			applyTimes = EscortDartConfig.OpenTimes
		end

		if var.ActorBuyApplyTimes ~= nil and var.ActorBuyApplyTimes >= 3 then
			Actor.sendTipmsg(sysarg,string.format("{color;FFff0000;您今天已经额外购买满%s次了,明天再来吧.}",5),256);
			return
		end

		local money = 200

		if Actor.changeMoney(sysarg,3,-money,GameLog.cHuangGangBuyTimes,"BuyHuangGang") then
			if var.ActorBuyApplyTimes ~= nil then
				var.ActorBuyApplyTimes = var.ActorBuyApplyTimes + 1
			else
				var.ActorBuyApplyTimes = 1
			end
		
			var.days.darttms = applyTimes - 1
			Actor.sendTipmsg(sysarg,"购买成功!",256);
		end
	elseif	tonumber(type) == 2 then --放弃购买
		local var = Actor.getStaticVar(sysarg);
		local d = var.d;
		if d == nil then 
			Actor.sendTipmsg(sysarg,"放弃购买失败!",256);
			return
		end
		var.days.BuyHuangGangFlag = 1 
	end
	--]]
end

--购买采集珍珠提示框

function Buy_CaiJiZhenZhuWndTip(sysarg)
	local str = "{color;FFFF0000;您要消耗100元宝购买一次采集珍珠<br/}{color;FF00FF00;(选择放弃购买,将不在面板上显示)}"
	Actor.messageBox(sysarg,0,0,str, "购买一次/Buy_CaiJiZhenZhu,1", "放弃购买/Buy_CaiJiZhenZhu,2", NULL, 0)
end

function Buy_CaiJiZhenZhu(sysarg,type)
	if tonumber(type) == 1 then --购买一次
		local var = Actor.getStaticVar(sysarg)
		if not var.BuyPearlTimes then
			var.BuyPearlTimes = 3
		elseif var.BuyPearlTimes <= 0 then
			Actor.sendTipmsg(sysarg,"今日购买次数达到上限,请明天再来",256)
			return
		end
	
		if not Actor.changeMoney(sysarg,3,-100,GameLog.cBuyPearlTimes,"buyCaiJiZhenZhu") then
			Actor.sendTipmsg(sysarg,"元宝不足,购买失败",256)
			return
		end
	
		local d = var.d
		var.BuyPearlTimes = var.BuyPearlTimes - 1
		if d[31] > 0 then
			d[31] = d[31] + 1
		else
			d[31] = 1
		end
	elseif	tonumber(type) == 2 then --放弃购买
		local var = Actor.getStaticVar(sysarg);
		if not var.days then var.days = {} end
		local d = var.d;
		if d == nil then 
			Actor.sendTipmsg(sysarg,"放弃购买失败!",256);
			return
		end
		var.days.BuyCaiJiZhenZhuFlag = 1 
	end
end
